package com.deyuanyun.pic.ctrl.mapper;

import com.deyuanyun.pic.ctrl.controller.vo.CpProtectionParamExpandVO;
import com.deyuanyun.pic.ctrl.controller.vo.CpProtectionParamQueryVO;
import com.deyuanyun.pic.ctrl.controller.vo.CpSegmentPlanVO;
import com.deyuanyun.pic.ctrl.domain.CpSegment;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 *  运行标准计划mapper接口
 *  @author axiao(xj08.dream@gmail.com)
 *  @date 2016-09-10
 *  @version 1.0
 *  Histroy: [修改人][时间][描述]
 */
public interface OperationPlanMapper {

    public List<CpProtectionParamExpandVO> queryParamByQueryVO(CpProtectionParamQueryVO cpProtectionParamQueryVO);

    /**
     * 当使用自定义标准的时候要先把以前的设置为真删除
     * @param ids
     * @return 
     * @author axiao(xj08.dream@gmail.com)
     * @date 2016-09-12
     */
    public int deleteCpStandard(@Param("ids") List<String> ids);

    /**
     * 当是管线阴保计划的时候，在保存或者发布的时候要在交叉点给予准确提示
     * @param fromMileage 起点绝对距离
     * @param toMileage 终止绝对距离
     * @return
     * @author axiao(xj08.dream@gmail.com)
     * @date 2016-09-12
     */
    public List<CpSegment> queryCrossSegment(@Param("pipeLineId") String pipeLineId, @Param("fromMileage") Long fromMileage,
                                             @Param("toMileage") Long toMileage);

    /**
     * 查询线路阴保计划列表
     * @param cpSegmentPlanVO
     * @return
     * @author axiao(xj08.dream@gmail.com)
     * @date 2016-09-12
     */
    public List<CpSegmentPlanVO> querySegmentPlan(CpSegmentPlanVO cpSegmentPlanVO);

    /**
     * 根据阴保线路id以及保护参数id集合批量删除阴保设施保护参数信息
     * @param cpSegmentId 阴保线路id
     * @param ids 保护参数id集合
     * @return 
     * @author axiao(xj08.dream@gmail.com)
     * @date 2016-11-05
     */
    public int deleteCpProtectionParam(@Param("cpSegmentId") String cpSegmentId, @Param("ids") List<String> ids);

}
